Skip to content

feat(web): surface frontend tool call activity - #418

Closed
yimi528 wants to merge 2 commits into
QwenAudio:mainfrom
yimi528:codex/pr-frontend-tool-activity
Closed

yimi528 wants to merge 2 commits into
QwenAudio:mainfrom
yimi528:codex/pr-frontend-tool-activity

Conversation

@yimi528

@yimi528 yimi528 commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • render frontend tool-call activity emitted by the realtime gateway
  • keep tool activity in chronological order with assistant messages
  • add focused client and component coverage for tool-call lifecycle states

The presentation model keeps only bounded, non-content metadata: call id, surface
(frontend / backend), tool name, status, timestamps/duration and an optional
error code. Raw arguments and results are deliberately dropped, the retained call
list is capped at 64, and terminal states cannot be reverted by a late event.

Scope is web presentation plus the two protocol/contract docs lines that describe
tool.call as a presentation-only event. No Gateway, backend or client-state
behaviour is changed.

Update — rebased onto current main

The branch had drifted 8 days behind main (385 files changed since the merge
base), so it was rebased onto main and force-pushed. Two things worth calling
out:

Validation

Re-run locally on this rebased head (Windows, Node 24.11.0):

  • npm run test --workspace web — 158 passed, 0 failed
  • npm run build — succeeded
  • node --test server/test/realtime-gateway.test.mjs — 5 passed, 0 failed
  • npx eslint . — clean

Closes #230
Closes #231

@x-lixu

x-lixu commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

感谢你对工具调用可视化的贡献,也感谢此前同步主分支、移除 Windows 自动重试改动并补充测试。这项能力很有价值,限制展示记录数量、不保留原始参数与结果的处理也很合理。

这次审核发现,展示状态还需要进一步与实际执行语义对齐:

  • response.interrupted 表示语音回复被打断,并不能证明工具已取消,不宜据此显示“工具已取消”。
  • 缺少 turnId 的后续事件会使用当前轮次,可能将跨轮完成的工具记录移动到新一轮对话;应保留首次关联的轮次。
  • 与最新 main 的对话面板滚动逻辑存在冲突,需要保留现有打开面板自动定位最新消息的行为。

我们正在收尾 2.0,按维护者决定先关闭本 PR,不合并当前实现。这并不是否定功能方向;欢迎后续基于最新 main,修正上述状态语义并补充跨轮/打断场景测试后重新提交。再次感谢!

@x-lixu x-lixu closed this Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Duplicate] 前台工具调用事件(见 #230) [Feature] 向客户端发送前台工具调用生命周期事件

2 participants